@if ($errors->any())
    <div id="error" class="modal fade">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">×</span></button>
                    <h4 class="modal-title" id="mySmallModalLabel">提示</h4>
                </div>
                <div class="modal-body">
                    <p>{{ $errors->first() }}</p>
                </div>
            </div>
        </div>
    </div>
    <script>
        $('#error').modal('show');
    </script>
@endif

@if (session('msg'))
    <div id="msg" class="modal fade">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">×</span></button>
                    <h4 class="modal-title" id="mySmallModalLabel">提示</h4>
                </div>
                <div class="modal-body">
                    <p>{{ session('msg') }}</p>
                </div>
            </div>
        </div>
    </div>
    <script>
        $('#msg').modal('show');
    </script>
@endif